﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NKD07
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUsername.Text == "admim" && txtPassword.Text == "123")
            {
                Session["Authenticate"] = "Yes";
                Session["User"] = "admin";
                Session["Role"] = "admin";
                Response.Redirect("default.aspx");
            }

            else if (txtUsername.Text == "user" && txtPassword.Text == "123")
            {
                Session["Authenticate"] = "Yes";
                Session["User"] = "user";
                Session["Role"] = "user";
                Response.Redirect("default.aspx");
            }
            
        }
    }
}
